package ai.plantdata.Creation.mode.AbstractFactoryPattern.factory;

import ai.plantdata.Creation.mode.AbstractFactoryPattern.abstracts.AbstractFactory;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.Color;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.Shape;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.impl.Blue;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.impl.Green;
import ai.plantdata.Creation.mode.AbstractFactoryPattern.interfaces.impl.Red;

public class ColorFactory extends AbstractFactory {
    
   @Override
   public Shape getShape(String shapeType){
      return null;
   }
   
   @Override
   public Color getColor(String color) {
      if(color == null){
         return null;
      }
      if("RED".equalsIgnoreCase(color)){
         return new Red();
      } else if("GREEN".equalsIgnoreCase(color)){
         return new Green();
      } else if("BLUE".equalsIgnoreCase(color)){
         return new Blue();
      }
      return null;
   }
}